If an error condition occurs, this routine returns an integer
value indicating the type of error. Possible return values are as
follows:
Return Description
0 Successful completion.
[EINVAL] The values specified by rwlock does not refer to an
initialized read-write lock object.
[EPERM] The calling thread does not hold the read-write lock
object.